home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / Projects / Tutorial Material / Zone Tutorial / Structure Notes / 4. Zone Control < prev    next >
Lisp/Scheme  |  1998-10-26  |  1KB  |  54 lines

  1. Zone Control 
  2.  
  3. Zone Control is ideal for sequencing expressions together, 
  4. and for having different resolutions present within one part. 
  5. More important still, it enables  elegant connections to be 
  6. made between melody symbols, note-lengths and zone lengths. 
  7. An example of this can be seen in the FRACTAL program. Here, 
  8. the zone length is created from the addition of all the 
  9. note-lengths in the rhy variable using the function make-zone.
  10. This means that the fractal compiles to exactly the 
  11. right zone length - impossible to achieve with the Timesheet.
  12.  
  13. (setq tonal (activate-tonality (overtone-series 1 12 1)))
  14.  
  15. (setq mat (gen-noise-brownian 9 0.4 0.4))
  16. (setq mel (vector-to-symbol a x mat))
  17.  
  18. ; Nigel has been using tick value 96 for 1/4 note. 
  19. ; Because Nigel often mixes ticks and ratios, the function must take
  20. ; both cases into account.
  21.  
  22. (defun use-nigel-ticks (l)
  23.   (let (out)
  24.     (dolist (x l)
  25.       (if (is-length-symbol x)
  26.         (push x out)
  27.         (push (* x 5) out)))
  28.     (nreverse out)))
  29.  
  30. (setq rhy (use-nigel-ticks (vector-to-list (vector-round 6 48 mat))))
  31.  
  32. (def-symbol
  33.    sound mel
  34. )
  35.  
  36. (def-length
  37.    sound rhy
  38. )
  39.  
  40. (def-zone
  41.    sound  (make-zone rhy)
  42. )             
  43.  
  44. (def-tonality
  45.    sound tonal
  46. )
  47.  
  48. (compile-instrument-p "ccl;output:" "zones"
  49.    sound
  50. )
  51.  
  52. Further examples of this technique, used in a less 
  53. experimental context can be seen in Files STRUCT3A-C. 
  54.